<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ajax测试</title>
    <script type="text/javascript">
        //创建ajax对象

        //1、IE浏览器创建
        /*var xhr = new ActiveXObject("Microsoft.XMLHTTP");  //最原始方式
        var xhr = new ActiveXObject("Msxml2.XMLHTTP");     //升级版本
        var xhr = new ActiveXObject("Msxml2.XMLHTTP.3.0"); //升级版本
        var xhr = new ActiveXObject("Msxml2.XMLHTTP.5.0"); //升级版本
        var xhr = new ActiveXObject("Msxml2.XMLHTTP.6.0"); //微软维护的最高ajax版本
        alert(xhr);*/

        //2、主流浏览器（火狐、谷歌、苹果、opera....、IE7以上）
        var xhr = new XMLHttpRequest();
        console.log(xhr);
        //XMLHttpRequest { onreadystatechange: null, readyState: 0, timeout: 0, withCredentials: false,
        //upload: XMLHttpRequestUpload, responseURL: "", status: 0, statusText: "", responseType: "", response: "" }
        
    </script>
</head>
<body>

</body>
</html>